package com.example.second.memo.classes;

import android.util.Log;

/**
 * @ClassName: Originator
 * @Description: java类作用描述
 * @Author: xinya
 * @CreateDate: 2020/12/21$ 17:10$
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
public class Originator {
    private static final String TAG = "Originator";
    // 需要被存储的备忘录对象
    private Memento mMemento;

    public Memento getMemento() {
        return mMemento;
    }

    public void setMemento(Memento memento) {
        mMemento = memento;
    }

    public Memento createMemento() {
        return new Memento(mMemento.getName(), mMemento.getAge());
    }

    public void show() {
        Log.d(TAG, "show: " + mMemento);
    }
}
